import request from '../utils/request'


// 
/**
 *  @parms resquest 请求地址 例如：http://197.82.15.15:8088/request/...
 *  @param '/testIp'代表vue-cil中config，index.js中配置的代理
 */



export function login(data) {
  return request({
    url: '/login',
    method: "post",
    data,
  });
}

// 获取作物种类列表
export function getCropList(data) {
  return request({
    url: '/business/marketPrice/variety/typeList',
    method: "get",
    params:data
  })
}

// 获取资讯列表
export function getNewsList(data) {
  return request({
    url: '/business/fmNews/list',
    method: "get",
    params:data
  })
}

// 获取资讯详情
export function getNewsDetail(id) {
  return request({
    url: `/business/fmNews/getInfo/${id}`,
    method: "get"
  })
}

// 获取行政区划列表
export function getAreaList(data) {
  return request({
    url: '/business/sysArea/list',
    method: "get",
    params:data
  })
}

// 获取批发市场价格列表
export function getMarketPriceList(data) {
  return request({
    url: '/business/marketPrice/list',
    method: "get",
    params:data
  })
}

// 获取市场列表
export function getMarketList(data) {
  return request({
    url: '/business/marketPrice/marketList',
    method: "get",
    params:data
  })
}

// 获取集市列表
export function getCalendarList(data) {
  return request({
    url: '/business/calendar/list/forapp',
    method: "get",
    params:data
  })
}



// 获取日历最小可选范围
export function getCalendarMinDate(data) {
  return request({
    url: '/business/marketPrice/selectEarlyTime',
    method: "get",
    params:data
  })
}
